import React, { useEffect } from "react";
import { router } from "./router";
// import request from "./utils/index";
import { useRoutes } from "react-router-dom";

const App = () => {
  const el = useRoutes(router);
  // useEffect(() => {
  //   const fetchData = async () => {
  //     try {
  //       const response = await request.get("/data");
  //       console.log("请求成功:", response);
  //     } catch {
  //       console.error("请求失败:");
  //     }
  //   };
  //   fetchData();
  // }, []);
  return <div>{el}</div>;
};

export default App;
